//
//  ZBFirstCollectionViewCell.m
//  MoBan
//
//  Created by apple on 16/7/8.
//  Copyright © 2016年 apple. All rights reserved.
//

#import "ZBFirstCollectionViewCell.h"
@interface ZBFirstCollectionViewCell()
@property(nonatomic,strong)UIImageView *imageview;
@property(nonatomic,strong)UILabel *namelable;
@end
@implementation ZBFirstCollectionViewCell
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self addUI];
    }
    return self;
}

/**
 添加控件
 */
-(void)addUI
{
    self.imageview = [[UIImageView alloc]init];
    self.imageview.image = [UIImage imageNamed:@"text.png"];
    [self.contentView addSubview:self.imageview];
    
    self.namelable = [[UILabel alloc]init];
    self.namelable.text = @"测试";
    [self.contentView addSubview:self.namelable];
}
-(void)layoutSubviews
{
    [super layoutSubviews];
    
    self.imageview.frame = CGRectMake(self.width/4, 5, self.width/4, self.height-10*Kscr);
    
    self.namelable.frame = CGRectMake(self.width/2, 0, self.width/2, self.height);
}
-(void)ZBSetdasouce:(NSString *)str
{

    self.namelable.text = str;
    NSLog(@"%@",str);
}
@end
